<template>
	<view class="card" @click="$emit('click', msgInfo._id)">
		<view class="left">
			<image :src="msgInfo.img" ></image>
		</view>
		<view class="right">
			<view class="text">
				{{msgInfo.title}}
			</view>
			<view class="time">
				{{msgInfo.created_at | timeFormat('YYYY-MM-DD HH:mm') }}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "XbdNewsCard",
		props: {
			msgInfo: '',
		},
		data() {
			return {}
		},
		methods: {}
	}
</script>

<style lang="scss" scoped>
	.card {
		display: flex;
		background-color: #ffffff;
		padding: 10rpx 0;
		// justify-content: space-between;
		border-radius: 16rpx;
		margin-top: 20rpx;

		.left {
			margin-right: 30rpx;

			image {
				width: 200rpx;
				height: 110rpx;
				border-radius: 12rpx;
			}
		}

		.right {
			padding: 6rpx 0;

			.text {
				width: 444rpx;
				height: 42rpx;
				font-size: 30rpx;
				font-weight: 400;
				color: #000623;
				overflow: hidden;
				white-space: nowrap;
				text-overflow: ellipsis;
				margin-bottom: 24rpx;
			}

			.time {
				// margin-top: 30rpx;
				font-size: 26rpx;
				color: #a0a7b8;
			}

		}
	}
</style>
